import java.util.concurrent.*;

public class Test {
    public static void main(String[] args) throws InterruptedException, ExecutionException {
        ExecutorService threadPool = Executors.newFixedThreadPool(2);
        MyCallable c = new MyCallable(200, 200);
        MyCallable c2 = new MyCallable(20, 10);
        Future<Integer> result = threadPool.submit(c);
        Integer sum = result.get();
        System.out.println("age=" + sum);
        result = threadPool.submit(c2);
        sum = result.get();
        System.out.println("age=" + sum);
    }
}
